package autoorder.zsxmlv.mapper;

import autoorder.zsxmlv.po.Goods;
import autoorder.zsxmlv.vo.GoodsVo;

import java.util.HashMap;
import java.util.List;

public interface GoodsMapper {

    /**
     * 根据商品状态获取所有商品
     * @param status 商品是否上架 (0上架  1下架)
     * @return
     */
    List<Goods> listAllGoodsByStatus(Integer status);

    List<Goods> selectGoodsByAll();

    List<Goods> selectAllGoodsByShopId(Integer shopId);

    List<GoodsVo> selectByPage(HashMap<Object, Object> map);

    int selectByCount(HashMap<Object, Object> map);

    int updateGoodsStatus(HashMap<String, Object> map);

    int deleteByPrimaryKey(Integer id);

    int deleteByShopId(Integer shopId);

    int insert(Goods record);

    int insertByBatch(List<Goods> list);

    int insertSelective(Goods record);

    Goods selectByPrimaryKey(Integer id);

    Goods selectByGoodsId(String goodsId);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);
}